package site.luojie.service.consumer.controller;

import org.apache.dubbo.rpc.RpcContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import site.luojie.service.api.WorkService;
import site.luojie.service.consumer.util.IpUtils;

import javax.servlet.http.HttpServletRequest;

/**
 * @author jie.luo
 * @since 2020/8/31
 */
@RestController
public class ConsumerController {

    @Autowired
    private WorkService workService;

    @RequestMapping("/work")
    public String work(String work, HttpServletRequest request) {
        return workService.doWork(work);
    }

}
